import React, { useState } from "react"

export default function StateDemo() {
  const [count, setCount] = useState(0)
  return (
    <>
      <h2>useState的使用</h2>
      <div>计数: {count}</div>
      <button onClick={() => setCount(count + 1)}>加1</button>
    </>
  )
}